package com.interview.content.service.impl;

import com.interview.common.utils.PageUtils;
import com.interview.common.utils.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.interview.content.dao.CmsInterviewImgDao;
import com.interview.content.entity.CmsInterviewImgEntity;
import com.interview.content.service.CmsInterviewImgService;


@Service("cmsInterviewImgService")
public class CmsInterviewImgServiceImpl extends ServiceImpl<CmsInterviewImgDao, CmsInterviewImgEntity> implements CmsInterviewImgService {

    @Autowired
    private CmsInterviewImgDao interviewImgDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CmsInterviewImgEntity> page = this.page(
                new Query<CmsInterviewImgEntity>().getPage(params),
                new QueryWrapper<CmsInterviewImgEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<CmsInterviewImgEntity> getAllById(Long id) {
        return interviewImgDao.getAllById(id);
    }

}